﻿<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="GroupMemberMaintain.aspx.vb" Inherits="WebForm_Manage_GroupMemberMaintain" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:HiddenField ID="hiUID" runat="server" />
            <asp:HiddenField ID="hiDBName" runat="server" />
            <asp:Label ID="lblTitle" runat="server" Text=""></asp:Label>
            <br />
            <asp:Label ID="lbGroupID" runat="server" meta:resourcekey="lblGroupID"></asp:Label>
            <asp:DropDownList ID="ddlGroupID" runat="server" AutoPostBack="True" DataTextField="GroupName"
                DataValueField="GroupID">
            </asp:DropDownList>
            <TServerControl:TGridView ID="gvUID" runat="server" AllowHoverEffect="False" AllowHoverSelect="False"
                AllowPaging="True" DataSourceID="objDSUID" ShowFooterWhenEmpty="False" ShowHeaderWhenEmpty="True"
                SkinID="pager" TotalRowCount="0" AutoGenerateColumns="False" DataKeyNames="UID1">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Button ID="btnEdit" CommandName="Edit" runat="server" 
                                meta:resourcekey="btnEdit" Visible='<%# Eval("canModi") %>' />
                                <asp:Button ID="btnDelete" CommandName="Delete" runat="server" 
                                meta:resourcekey="btnDelete" Visible='<%# Eval("canDelete") %>' />
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:Button ID="btnUpdate" CommandName="Update" runat="server" meta:resourcekey="btnUpdate" />
                            <asp:Button ID="btnCancel" CommandName="Cancel" runat="server" meta:resourcekey="btnCancel" />
                        </EditItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField meta:resourcekey="UID">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtUID" runat="server" Enabled='<%# Eval("canModi") %>' Text='<%# Bind("UID1") %>'
                                Width="68px"></asp:TextBox>
                            <asp:Button ID="btnUID" runat="server" onclick="btnUID_Click" Text="..." />
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("UID1") %>' Width="68px"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </TServerControl:TGridView>
            <asp:ObjectDataSource ID="objDSUID" runat="server" SelectMethod="GetUIDByGroupID"
                TypeName="OAMS.BBL.GroupBBL" UpdateMethod="InsertGroupMember" DeleteMethod="DeleteGroupMember">
                <DeleteParameters>
                    <asp:ControlParameter ControlID="ddlGroupID" Name="GroupID" PropertyName="SelectedValue"
                        Type="String" />
                    <asp:Parameter Name="UID1" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                </DeleteParameters>
                <UpdateParameters>
                    <asp:ControlParameter ControlID="ddlGroupID" Name="GroupID" PropertyName="SelectedValue"
                        Type="String" />
                    <asp:Parameter Name="UID1" Type="String" />
                    <asp:ControlParameter ControlID="hiUID" Name="CrtUID" PropertyName="Value" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                </UpdateParameters>
                <SelectParameters>
                    <asp:ControlParameter ControlID="ddlGroupID" Name="GroupID" PropertyName="SelectedValue"
                        Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <br />
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
